home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PASCSRC.ZIP / PROCED2.PAS < prev    next >
Pascal/Delphi Source File  |  1988-01-15  |  865b  |  30 lines

  1.                                 (* Chapter 5 - Program 2 *)
  2. program Another_Procedure_Example;
  3.  
  4. var Count : integer;
  5.     Index : integer;
  6.  
  7. procedure Print_Data_Out(Puppy : integer);
  8. begin
  9.    Writeln('This is the print routine',Puppy:5);
  10.    Puppy := 12;
  11. end;
  12.  
  13. procedure Print_And_Modify(var Cat : integer);
  14. begin
  15.    Writeln('This is the print and modify routine',Cat:5);
  16.    Cat := 35;
  17. end;
  18.  
  19. begin  (* main program *)
  20.    for Count := 1 to 3 do begin
  21.       Index := Count;
  22.       Print_Data_Out(Index);
  23.       Writeln('Back from the print routine, Index =',Index:5);
  24.       Print_And_Modify(Index);
  25.       Writeln('Back from the modify routine, Index =',Index:5);
  26.       Print_Data_Out(Index);
  27.       Writeln('Back from print again and the Index =',Index:5);
  28.       Writeln;  (* This is just for formatting *)
  29.    end;
  30. end.  (* of main program *)